package day03;
//算术运算符的演示
public class OperDemo1 {
    public static void main(String[] args) {
        //算术运算符+.-.*./.%.++.--
        System.out.println(5 % 2);
        System.out.println(2 % 5);
        System.out.println(8 % 2);
        System.out.println(0 % 5);
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        int a = 5;
        System.out.println(++a);
        System.out.println("~~~~~~~~~~~~~++单独使用~~~~~~~~~~~~~~~~");
        //++单独使用
        int a1 = 5, b1 = 6;
        a1++;
        ++b1;
        System.out.println(a1);
        System.out.println(b1);
        //++被使用
        System.out.println("~~~~~~~~~~~~~++被使用~~~~~~~~~~~~~~~~");
        int c = 7, d = 8;
        int e = c++;//将c++的值7赋值给e，同时c自增1变为8
        int f = ++d;//将++d的值9赋值给f，同时d自增1变为9
        System.out.println(c);//8
        System.out.println(d);//9
        System.out.println(e);//7
        System.out.println(f);//9
        System.out.println("~~~~~~~~~~~~~~--单独使用~~~~~~~~~~~~~~~~~~~");
        int a11 = 5, b11 = 6;
        a11--;
        --b11;
        System.out.println(a11);
        System.out.println(b11);
        System.out.println("~~~~~~~~~~~~~~--被使用~~~~~~~~~~~~~~~~~~~");
        int c1 = 7, d1 = 8;
        int c11 = c1--;
        int d11 = --d1;
        System.out.println(c1);
        System.out.println(d1);
        System.out.println(c11);
        System.out.println(d11);
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");


    }
}